/// ----------------------------------------------
/// !!! 此文件由工具自动生成，请勿直接修改。 !!!
/// !!! Tabs to Spaces !!!
/// !!! 生成时间：2021-05-10 14:57:23.328
/// ----------------------------------------------

using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using DLC.Module.DataTable;

namespace DLC.Game.DataTable.ArchiveScriptableObject.Editor
{
    ///
    /// !!! Machine generated code !!!
    ///
    [CustomEditor(typeof(ExcelExample))]
    public class ExcelExampleEditor : BaseExcelEditor<ExcelExample>
    {	    
        public override bool Load()
        {
            ExcelExample targetData = target as ExcelExample;

            string path = targetData.SheetName;
            if (!File.Exists(path))
                return false;

            string sheet = targetData.WorksheetName;

            ExcelQuery query = new ExcelQuery(path, sheet);
            if (query != null && query.IsValid())
            {
                targetData.DataArray = query.Deserialize<ExcelExampleData>().ToArray();
                EditorUtility.SetDirty(targetData);
                AssetDatabase.SaveAssets();
                return true;
            }
            else
                return false;
        }
    }
}
